package cn.gson.crmdemo.controller.table;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONArray;

import cn.gson.crmdemo.model.service.CaiWuBaoBiaoService;

@Controller
public class CaiWuBaoBiaoController {

	@Autowired
	CaiWuBaoBiaoService cw;
	
	
	@RequestMapping("log-json5")
	@ResponseBody
	public JSONArray logjson(@RequestParam("m")int m) {
		if(m==1) {
			return cw.selectAlltt();
		}else {
			return cw.selectoption();
		}
		
		 
	}
	
	
	@RequestMapping("selectoption")
	@ResponseBody
	public JSONArray selectoption() {
		return cw.selectoption();
		 
	}
}

